const express = require('express')
const router = express.Router()
const userinfo_Handler = require('../router_handler/userinfo')
const expressjoi = require('@escook/express-joi')
const { update_userinfo_schema, update_password_schema, update_avatar_schema } = require('../schema/user')
router.get('/userinfo', userinfo_Handler.getUserinfo)
router.post('/userinfo', expressjoi(update_userinfo_schema), userinfo_Handler.updateUserinfo)
router.post('/updatepwd', expressjoi(update_password_schema), userinfo_Handler.updatePassword)
router.post('/update/avatar', expressjoi(update_avatar_schema), userinfo_Handler.updateAvatar)
module.exports = router